var legenddistance = {};
legenddistance['734'] = 1942
legenddistance['77D'] = 16831
legenddistance['319'] = 21362
legenddistance['74V'] = 194848
legenddistance['320'] = 20715
legenddistance['77Z'] = 39487
legenddistance['77X'] = 9063
legenddistance['74H'] = 128819
legenddistance['74D'] = 77033
legenddistance['763'] = 7121
legenddistance['Operating crew'] = 3884
legenddistance['76Z'] = 55671
legenddistance['77Y'] = 47255
legenddistance['ER4'] = 647
legenddistance['77J'] = 12947
legenddistance['74J'] = 9710
$(function () {
var chart;
$(document).ready(function() {
// Build the chart
chart = new Highcharts.Chart({
chart: {
renderTo: 'aircraft_distance',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: ''
},
tooltip: {
pointFormat: '{series.name}: {point.percentage}%',
percentageDecimals: 1
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
color: '#000000',
connectorColor: '#000000',
formatter: function() {
return ''+ this.point.name +': '+ Math.round(this.percentage*10)/10 +' % (' + legenddistance[this.point.name].toLocaleString() + ')';
}
}
}
},
series: [{
type: 'pie',
name: 'Sectors by Aircraft',
data: [
['734',0.3],
['77D',2.6],
['319',3.3],
['74V',30.1],
['320',3.2],
['77Z',6.1],
['77X',1.4],
['74H',19.9],
['74D',11.9],
['763',1.1],
['Operating crew',0.6],
['76Z',8.6],
['77Y',7.3],
['ER4',0.1],
['77J',2],
['74J',1.5]
]
}]
});
});
});